package com.shortchainsystem.model.domain.link.DO;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.HashMap;
import java.util.Map;

@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class IpLocationStatsDO {
    private String ipLocation;
    private Integer count;

    public static Map<String,Integer> createLocationMap(){
        Map<String,Integer> locationMap = new HashMap<>();
        String[] locations = {
            "北京", "天津", "河北", "山西", "内蒙古", "辽宁", "吉林", "黑龙江",
            "上海", "江苏", "浙江", "安徽", "福建", "江西", "山东", "河南",
            "湖北", "湖南", "广东", "广西", "海南", "重庆", "四川", "贵州",
            "云南", "西藏", "陕西", "甘肃", "青海", "宁夏", "新疆", "香港", "澳门"
        };
        for (String location : locations) {
            locationMap.put(location, 0);
        }
        return locationMap;
    }
}
